﻿using System.Collections.Generic;
using System.ServiceModel;

using Opentao.NotificationService.Application.Service.DTO;

namespace Opentao.NotificationService.Application.Service
{
    [ ServiceContract ]
    public interface IAdminService
    {
        #region Recipient Contracts
        [ OperationContract ]
        void CreateRecipient(
            string email,
            string phone,
            string name );

        [ OperationContract ]
        RecipientDTO GetRecipient( int id );

        [ OperationContract ]
        List<RecipientDTO> GetRecipients(
            bool isSortOrderAscending,
            string sortProperty,
            int recordsPerPage,
            int pageNumber );

        [ OperationContract ]
        void UpdateRecipient(
            int id,
            string email,
            string phone,
            string name );

        [ OperationContract ]
        void DeleteRecipient( int id );

        [ OperationContract ]
        void SubscribeRecipient(
            int recipientId,
            int eventTypeId );

        [ OperationContract ]
        void UnSubscribeRecipient(
            int recipientId,
            int eventTypeId );

        [ OperationContract ]
        int GetRecipientsCount();
        #endregion




        #region ImportanceLevel Contracts
        [ OperationContract ]
        void CreateImportanceLevel(
            string title,
            bool useEmail,
            bool usePhone );

        [ OperationContract ]
        List<ImportanceLevelDTO> GetImportanceLevels();

        [ OperationContract ]
        void UpdateImportanceLevel(
            int id,
            string title,
            bool useEmail,
            bool usePhone );

        [ OperationContract ]
        void DeleteImportanceLevel( int id );
        #endregion




        #region EventType Contracts
        [ OperationContract ]
        void CreateEventType( string title );

        [ OperationContract ]
        List<EventTypeDTO> GetEventTypes();

        [ OperationContract ]
        void UpdateEventType(
            int id,
            string title );

        [ OperationContract ]
        void DeleteEventType( int id );
        #endregion
    }
}